With the development of communications technologies, especially the development of Internet technologies, increasingly more users begin to come into contact with or use mobile applications. A mobile application is an application that is used in a mobile terminal and needs to be connected to a network for acquiring data. In a process of using a mobile application, a connection speed of a mobile network not only affects product experience of the mobile application, but also is closely associated with economic benefits of a developer of the mobile application.
In a use scenario of a mobile application, different from the simplicity of a conventional network environment for an Internet application of a personal computer (PC), a network environment of the mobile application changes frequently, and the network environment also becomes more complicated. For example, for a mobile terminal having a 3G card installed, the mobile terminal is connected to a 3G network environment on the way to work; the mobile terminal automatically switches to a Wifi network environment upon arrival at an office environment with Wifi; and the mobile terminal again switches to a new Wifi network environment upon return to a home with Wifi. It can be seen that, the mobile terminal can automatically switch a connection state at any time according to a change of an external network environment.
In order to enable a mobile application to acquire data more rapidly and conveniently, generally a plurality of backend data services is deployed in network environments, such as China Mobile, China Unicom, and China Telecom, to reduce time consumed for acquiring data. Therefore, how a mobile application rapidly and accurately selects an IP address of a network service in a network environment when the network environment of a mobile terminal changes will be an important factor that affects a speed at which the mobile application accesses a network.
When a mobile application is connected to a network or when a network environment changes, the mobile application needs to report a network environment, for example, an IP address and a network type (2G, 3G, Wifi, and the like), of a mobile terminal to a network access apparatus corresponding to the mobile application. The network access apparatus calculates, according to a current network environment of the mobile application, a batch of IP addresses of optimal network services and a network quality situation of each IP address, and returns the batch of IP addresses of optimal network services and the network quality situation of each IP address to the mobile application. The mobile application selects an IP address having the highest network quality for connection, and after the connection fails, may select a network environment having slightly lower network quality for connection; this process is sequentially executed until a network service is successfully connected.
In this scenario, each time a network environment of a mobile device changes, all mobile applications on the mobile device need to acquire data, which leads to a long time consumed for network access.
Currently, no effective solution is proposed for the problem that a long time is consumed for network access of a mobile application in the existing technology.